import request from '@/utils/request'

/** * * 获取组织架构数据 * */
export function getDepartmentAPI() {
  return request({
    url: '/company/department'
  })
}
/** * * 获取部门负责人列表 * */
export function getManagerAPI() {
  return request({
    url: `/sys/user/simple`
  })
}
/** * * 获取部门详情 * */
export function getDepartmentDetailAPI(id) {
  return request({
    url: `/company/department/${id}`
  })
}
/** * * 新增部门 * */
export function addDepartmentAPI(data) {
  return request({
    url: `/company/department`,
    method: 'post',
    data
  })
}
/** * * 编辑部门 * */
export function updateDepartmentAPI(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
/** * * 删除部门 * */
export function deleteDepartmentAPI(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
